import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/layout/Home'
import Banner from '@/pages/Banner'
import Login from '@/pages/Login'
import Category from '@/pages/Category'
import NotFound from '@/pages/NotFound'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: 'admin',
  routes: [
    {
        name: 'home',
        path: '/',
        component: Home,
        children: [
            {
                name: 'Banner',
                path: '/banner',
                component: Banner
            },
            {
                name: 'Category',
                path: '/category',
                component: Category
            }
        ]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '*',
      name: 'NotFound',
      component: NotFound
    }
  ]
})
